<div>
    <yu-panel title="重跑任务监控" v-loading="loading">
		<div class="formdiv">
			<yu-xform ref="runForm" label-width="120px" v-model="runFormData" label-width="140px">
				<yu-xform-group :column="3">
					<yu-xform-item label="方案代码" placeholder="方案代码" ctype="input" name="schemeCode" :disabled="true"></yu-xform-item>
					<yu-xform-item label="方案名称" placeholder="方案名称" ctype="input" name="schemeName" :disabled="true"></yu-xform-item>
				</yu-xform-group>
			</yu-xform>
		</div>
        <yu-xtable ref="wftRunRefTable" row-number :data-url="wftRunDataUrl" :pageable="true" @sort-change="wftRunSort"
            max-height="500" :default-load="false">
            <yu-xtable-column label="系统名称" prop="appName" width="100px" sortable="custom" :show-overflow-tooltip="true"></yu-xtable-column>
            <yu-xtable-column label="任务名称" prop="groupName" width="100px" sortable="custom" :show-overflow-tooltip="true">
                <template slot-scope="scope">
                    <a style="text-decoration:underline;color:#636CE4 " href="javascipt:void(0);" @click="showTask(scope.row)">{{
                        scope.row.groupName }}</a>
                </template>
            </yu-xtable-column>
            <yu-xtable-column label="任务周期" prop="cyclePnt" width="100px" sortable="custom" :show-overflow-tooltip="true"></yu-xtable-column>
            <yu-xtable-column label="任务号" prop="cycleNo" :show-overflow-tooltip="true"></yu-xtable-column>
            <yu-xtable-column label="任务状态" prop="runState" width="100px" sortable="custom" data-code="USE_TASK_RUN_STATE" :show-overflow-tooltip="true"></yu-xtable-column>
            <yu-xtable-column label="预估总数" prop="estCnt" width="130" sortable="custom" :render-header="renderHeader" :show-overflow-tooltip="true">
                <template slot-scope="scope">
                    <a style="text-decoration:underline;color:#636CE4 " href="javascipt:void(0);" @click="showTask(scope.row)">{{
                        scope.row.estCnt }}</a>
                </template>
            </yu-xtable-column>
            <yu-xtable-column label="当前总数" prop="currentCnt" width="130" sortable="custom" :render-header="renderHeader" :show-overflow-tooltip="true">
                <template slot-scope="scope">
                    <a style="text-decoration:underline;color:#636CE4 " href="javascipt:void(0);" @click="showTask(scope.row, 'C')">{{
                        scope.row.currentCnt }}</a>
                </template>
            </yu-xtable-column>
            <yu-xtable-column label="成功总数" prop="successCnt" width="100px" sortable="custom" :show-overflow-tooltip="true">
                <template slot-scope="scope">
                    <a style="text-decoration:underline;color:#636CE4 " href="javascipt:void(0);" @click="showTask(scope.row, 'S')">{{
                        scope.row.successCnt }}</a>
                </template>
            </yu-xtable-column>
            <yu-xtable-column label="失败总数" prop="failedCnt" width="100px" sortable="custom" :show-overflow-tooltip="true">
                <template slot-scope="scope">
                    <a style="text-decoration:underline;color:#636CE4 " href="javascipt:void(0);" @click="showTask(scope.row, 'F')">{{
                        scope.row.failedCnt }}</a>
                </template>
            </yu-xtable-column>
            <yu-xtable-column label="等待总数" prop="waitCnt" width="100px" sortable="custom" :show-overflow-tooltip="true">
                <template slot-scope="scope">
                    <a style="text-decoration:underline;color:#636CE4 " href="javascipt:void(0);" @click="showTask(scope.row, 'W')">{{
                        scope.row.waitCnt }}</a>
                </template>
            </yu-xtable-column>
            <yu-xtable-column label="队列中数" prop="queneCnt" width="100px" sortable="custom" :show-overflow-tooltip="true">
                <template slot-scope="scope">
                    <a style="text-decoration:underline;color:#636CE4 " href="javascipt:void(0);" @click="showTask(scope.row, 'Q')">{{
                        scope.row.queneCnt }}</a>
                </template>
            </yu-xtable-column>
            <yu-xtable-column label="执行中数" prop="execCnt" width="100px" sortable="custom" :show-overflow-tooltip="true">
                <template slot-scope="scope">
                    <a style="text-decoration:underline;color:#636CE4 " href="javascipt:void(0);" @click="showTask(scope.row, 'X')">{{
                        scope.row.execCnt }}</a>
                </template>
            </yu-xtable-column>
            <yu-xtable-column label="未知总数" prop="unknowCnt" width="100px" sortable="custom" :show-overflow-tooltip="true">
                <template slot-scope="scope">
                    <a style="text-decoration:underline;color:#636CE4 " href="javascipt:void(0);" @click="showTask(scope.row, 'U')">{{
                        scope.row.unknowCnt }}</a>
                </template>
            </yu-xtable-column>
            <yu-xtable-column fixed="right" label="操作" width="200" align='center'>
                <template slot-scope="scope">
                    <yu-button @click="showFlowChart(scope.row)" type="primary" size="small" style="margin-left:5px">流程图</yu-button>
                    <yu-button @click="redoFlowChart(scope.row)" type="success" size="small" v-if="((scope.row.runState==='I'||scope.row.runState==='S')||(scope.row.runState==='T'&&scope.row.failedCnt!=0))&&runFnShow">续跑</yu-button>
                    <yu-button @click="interruptFlowChart(scope.row)" type="warning" size="small" v-if="((scope.row.runState==='C'||scope.row.runState==='R'||scope.row.runState==='T'))&&runFnShow">中断</yu-button>
                    <yu-button @click="deleteFlowChart(scope.row)" size="small" v-if="(scope.row.runState==='N' || scope.row.runState==='I'|| scope.row.runState==='S')&&runFnShow"
                        type="danger">删除</yu-button>
                </template>
            </yu-xtable-column>
        </yu-xtable>
    </yu-panel>
</div>
<style type="text/css">
	.formdiv{
		padding-top: 15px;
	}
</style>